package com.mask.mq.consumer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author hx
 * @since 2021/11/21 1:28 下午
 */

@Component
@Slf4j
public class DirectReceive {

    @RabbitListener(queues = "myqueue")
    public void demo1(String msg) {
        log.info("demo1收到消息:{}",msg);
    }

    @RabbitListener(queues = "myqueue")
    public void demo2(String msg) {
        log.info("demo2收到消息:{}",msg);
    }
}
